<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/


//                       .::::.
//                     .::::::::.
//                    :::::::::::
//                 ..:::::::::::'
//              '::::::::::::'
//                .::::::::::
//           '::::::::::::::..
//                ..::::::::::::.
//              ``::::::::::::::::
//               ::::``:::::::::'        .:::.
//              ::::'   ':::::'       .::::::::.
//            .::::'      ::::     .:::::::'::::.
//           .:::'       :::::  .:::::::::' ':::::.
//          .::'        :::::.:::::::::'      ':::::.
//         .::'         ::::::::::::::'         ``::::.
//     ...:::           ::::::::::::'              ``::.
//    ```` ':.          ':::::::::'                  ::::..
//                       '.:::::'                    ':'````..

// Route::get('/', function () {

//     return view('Home.index');

// });
Route::get('/','IndexController@index');
//前台买车页面
Route::get('buy/{a?}/{b?}/{c?}/{d?}','BuyController@buy');




//管理员登录
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register',
	['middleware'=>'App\Http\Middleware\EmailMiddleware',
	'uses'=> 'Auth\AuthController@postRegister']);
Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');

//分期购车页
Route::get('home/money','MoneyController@money');

//我要卖车页
Route::get('home/sell','SellController@sale');

//后台主页
Route::get('admin/index','AdminController@index');
Route::get('admin/adm','AdminController@adm');

//车辆添加
Route::get('admin/addcar','AdminController@addcar');
Route::post('admin/addcar','AdminController@addcar');


Route::get('admin/getAttributeByType/{b_id?}','AdminController@getAttributeByType');
Route::get('admin/songetAttributeByType/{b_id?}','AdminController@songetAttributeByType');
//车辆类型list
Route::get('admin/modellist','AdminController@modellist');
Route::post('admin/modellist','AdminController@modellist');
Route::get('admin/modelupd/{sid}','AdminController@modelupd');
Route::post('admin/modelupd/{sid}','AdminController@modelupd');
Route::get('admin/modeldel/{sid}','AdminController@modeldel');
//车辆类型添加
Route::get('admin/addmodel','AdminController@addmodel');
Route::post('admin/addmodel','AdminController@addmodel');
Route::get('/testInput','testInputController@test');
//车辆评估
Route::get('admin/ping','AdminController@ping');
//求购
Route::get('admin/buycar','AdminController@buycar');
//预约
Route::get('admin/yuyue','AdminController@yuyue');
//询价
Route::get('admin/xun','AdminController@xun');


//后台车源
//Route::get('admin/car', 'CarController@car');
Route::get('admin/car/{a?}/{b?}/{c?}/{d?}/{e?}/{f?}/{g?}/{h?}/{i?}/{j?}/{k?}/{l?}', 'CarController@carslist');

Route::get('admin/del/{pid}', 'CarController@del');



//车的详细页

//Route::get('goods/{id}', 'GoodsController@show');

Route::get('home/goods/{p_id?}', 'GoodsController@show');


//后台汽车列表
Route::get('admin/list','AdminController@clist');
// Route::get('','AdminController@');

//品牌列表
Route::get('admin/blist','AdminController@blist');


// Route::get('admin/addbr','AdminController@addbr');


//品牌列表的增删改查`
Route::get('admin/addbr/{bid?}','AdminController@addbr');
Route::post('admin/addbr/{bid}','AdminController@postAddbr');
Route::get('admin/delbrand/{bid}','AdminController@delBrand');
Route::any('admin/editbrand/{bid}','AdminController@editBrand');
Route::post('admin/editbrand','AdminController@editBrand');

 
//车型管理
Route::get('brands/blist','BrandsController@blist');
Route::get('brands/addcm','BrandsController@addcm');
Route::post('brands/addcm','BrandsController@addcm');
Route::get('brands/del/{b_id}','BrandsController@del');
Route::get('brands/edit/{b_id}','BrandsController@edit');//编辑款式
Route::get('brands/editmodel/{b_id}','BrandsController@editModel');//编辑车型

Route::get('brands/cmlist','BrandsController@cmlist');
Route::get('brands/getTree','BrandsController@getTree');
// Route::get('brands/cmlist','BrandsController@pp');
Route::get('brands/getcx/{b_id?}','BrandsController@getcx');
Route::get('brands/ishot','BrandsController@ishot');
Route::get('brands/ishots','BrandsController@ishots');
Route::get('brands/isshow','BrandsController@isshow');
Route::get('brands/isshows','BrandsController@isshows');
Route::get('brands/isrecom','BrandsController@isrecom');
Route::get('brands/isrecoms','BrandsController@isrecoms');
Route::get('brands/hy','BrandsController@hy');


//求购车页面
Route::get('home/addcar','HomeController@addcar');
Route::post('home/addcar','HomeController@addcar');
Route::get('home/getAttributeByType/{b_id?}','HomeController@getAttributeByType');
Route::get('home/songetAttributeByType/{b_id?}','HomeController@songetAttributeByType');


//新闻模块

Route::post('new/addcate','NewController@postCate');
Route::get('new/delcate/{catid}','NewController@delCate');
Route::any('new/editcate/{catid}','NewController@editCate');


Route::post('new/addnews','NewController@postNews');
Route::get('new/delnews/{n_id}','NewController@delNews');
Route::any('new/editnews/{n_id}','NewController@editNews');


//贷款模块
Route::get('home/tomoney','MoneyController@tomoney');
Route::post('home/tomoney','MoneyController@tomoney');
//短信模块
Route::get('sm/{mobile}','SmsController@sm');
Route::get('check/{rand?}','SmsController@checksm');

Route::get('new/newscate','NewController@newsCate');//分类管理
Route::get('new/newslist','NewController@newsList');//新闻管理
Route::get('new/addcate','NewController@addCate');//添加分类
Route::get('new/addnews','NewController@addNews');//添加新闻
//首页卖车手机号码收集
Route::get('home/phoneval/{phone?}','IndexController@phone');//首页电话收集
Route::get('home/phonetwoval/{phone?}','IndexController@phonetwo');//卖车页电话手机
Route::get('home/phonetwovalm/{nameArr?}','IndexController@tomoney');//贷款信息收集



